package com.eling.elcms.basedoc.service.impl;

import com.eling.elcms.basedoc.dao.IAdminDivisionDao;
import com.eling.elcms.basedoc.model.AdministrativeDivision;
import com.eling.elcms.basedoc.service.IAdminDivisionService;
import com.eling.elcms.core.service.impl.GenericManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminDivisionServiceImpl extends GenericManagerImpl<AdministrativeDivision, Long> implements IAdminDivisionService {

	IAdminDivisionDao divisionDao;

	@Override
	public List<AdministrativeDivision> queryByParent(String parentCode) {
		return divisionDao.queryByParent(parentCode);
	}
	
	@Autowired
	public void setDao(IAdminDivisionDao dao){
		this.dao=dao;
		divisionDao = dao;
	}

}
